﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo0618
{
    class SumUtils
    {
        public int Sum(int a,int b) 
        {
            //两个整数相加
            return a+b;
        }
        public double Sum(double c,double d) 
        {
            //两个小数相加
            return c + d;
        }
        public string Sum(string s1,string s2) 
        {
            //两个字符串相加
            return s1 + s2;
        }
        public int Sum(int num)
        {
            int sum = 0;
            for (int i = 0; i <= num; i++)
            {
                sum += i;
            }
            return sum;
        }
    }
}
